3.4.81 \(\int (a+b \log (c (d+e x)^n)) (f+g \log (c (d+e x)^n)) \, dx\) [381]

Optimal. Leaf size=110 \[ -((b f+a g) n x)+2 b g n^2 x-\frac {2 b g n (d+e x) \log \left (c (d+e x)^n\right )}{e}+x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac {d \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )^2}{4 b e g} \]

[Out]

-(a*g+b*f)*n*x+2*b*g*n^2*x-2*b*g*n*(e*x+d)*ln(c*(e*x+d)^n)/e+x*(a+b*ln(c*(e*x+d)^n))*(f+g*ln(c*(e*x+d)^n))+1/4
*d*(b*f+a*g+2*b*g*ln(c*(e*x+d)^n))^2/b/e/g

________________________________________________________________________________________

Rubi [A]
time = 0.12, antiderivative size = 110, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {2478, 2458, 2388, 2338, 2332} \begin {gather*} \frac {d \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )^2}{4 b e g}+x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )-n x (a g+b f)-\frac {2 b g n (d+e x) \log \left (c (d+e x)^n\right )}{e}+2 b g n^2 x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]),x]

[Out]

-((b*f + a*g)*n*x) + 2*b*g*n^2*x - (2*b*g*n*(d + e*x)*Log[c*(d + e*x)^n])/e + x*(a + b*Log[c*(d + e*x)^n])*(f
+ g*Log[c*(d + e*x)^n]) + (d*(b*f + a*g + 2*b*g*Log[c*(d + e*x)^n])^2)/(4*b*e*g)

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2388

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.))/(x_), x_Symbol] :> Dist[d, Int[(d
+ e*x)^(q - 1)*((a + b*Log[c*x^n])^p/x), x], x] + Dist[e, Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /
; FreeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]

Rule 2458

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[(g*(x/e))^q*((e*h - d*i)/e + i*(x/e))^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rule 2478

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(g_.)),
 x_Symbol] :> Simp[x*(a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]), x] - Dist[e*n, Int[(x*(b*f + a*g +
 2*b*g*Log[c*(d + e*x)^n]))/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x]

Rubi steps

\begin {align*} \int \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx &=x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )-(b e n) \int \frac {x \left (f+g \log \left (c (d+e x)^n\right )\right )}{d+e x} \, dx-(e g n) \int \frac {x \left (a+b \log \left (c (d+e x)^n\right )\right )}{d+e x} \, dx\\ &=x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )-(b n) \text {Subst}\left (\int \frac {\left (-\frac {d}{e}+\frac {x}{e}\right ) \left (f+g \log \left (c x^n\right )\right )}{x} \, dx,x,d+e x\right )-(g n) \text {Subst}\left (\int \frac {\left (-\frac {d}{e}+\frac {x}{e}\right ) \left (a+b \log \left (c x^n\right )\right )}{x} \, dx,x,d+e x\right )\\ &=x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )-\frac {(b n) \text {Subst}\left (\int \left (f+g \log \left (c x^n\right )\right ) \, dx,x,d+e x\right )}{e}+\frac {(b d n) \text {Subst}\left (\int \frac {f+g \log \left (c x^n\right )}{x} \, dx,x,d+e x\right )}{e}-\frac {(g n) \text {Subst}\left (\int \left (a+b \log \left (c x^n\right )\right ) \, dx,x,d+e x\right )}{e}+\frac {(d g n) \text {Subst}\left (\int \frac {a+b \log \left (c x^n\right )}{x} \, dx,x,d+e x\right )}{e}\\ &=-b f n x-a g n x+\frac {d g \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 b e}+x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac {b d \left (f+g \log \left (c (d+e x)^n\right )\right )^2}{2 e g}-2 \frac {(b g n) \text {Subst}\left (\int \log \left (c x^n\right ) \, dx,x,d+e x\right )}{e}\\ &=-b f n x-a g n x+\frac {d g \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 b e}+x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac {b d \left (f+g \log \left (c (d+e x)^n\right )\right )^2}{2 e g}-2 \left (-b g n^2 x+\frac {b g n (d+e x) \log \left (c (d+e x)^n\right )}{e}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 76, normalized size = 0.69 \begin {gather*} \frac {e (a (f-g n)+b n (-f+2 g n)) x+(a g+b (f-2 g n)) (d+e x) \log \left (c (d+e x)^n\right )+b g (d+e x) \log ^2\left (c (d+e x)^n\right )}{e} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]),x]

[Out]

(e*(a*(f - g*n) + b*n*(-f + 2*g*n))*x + (a*g + b*(f - 2*g*n))*(d + e*x)*Log[c*(d + e*x)^n] + b*g*(d + e*x)*Log
[c*(d + e*x)^n]^2)/e

________________________________________________________________________________________

Maple [A]
time = 0.41, size = 156, normalized size = 1.42

method result size
norman \(\left (2 b g \,n^{2}-n a g -n b f +a f \right ) x +\left (-2 b g n +a g +b f \right ) x \ln \left (c \,{\mathrm e}^{n \ln \left (e x +d \right )}\right )+b g x \ln \left (c \,{\mathrm e}^{n \ln \left (e x +d \right )}\right )^{2}+\frac {n \left (-2 b d g n +a d g +b d f \right ) \ln \left (e x +d \right )}{e}+\frac {b d g \ln \left (c \,{\mathrm e}^{n \ln \left (e x +d \right )}\right )^{2}}{e}\) \(116\)
default \(x a f +x a g \ln \left (c \left (e x +d \right )^{n}\right )-a g n x +\frac {a g n d \ln \left (e x +d \right )}{e}+x b \ln \left (c \left (e x +d \right )^{n}\right ) f -b f n x +\frac {b f n d \ln \left (e x +d \right )}{e}+b g x \ln \left (c \,{\mathrm e}^{n \ln \left (e x +d \right )}\right )^{2}+\frac {b d g \ln \left (c \,{\mathrm e}^{n \ln \left (e x +d \right )}\right )^{2}}{e}+2 b g \,n^{2} x -\frac {2 n^{2} b d g \ln \left (e x +d \right )}{e}-2 b g n x \ln \left (c \,{\mathrm e}^{n \ln \left (e x +d \right )}\right )\) \(156\)
risch \(\text {Expression too large to display}\) \(1245\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*(e*x+d)^n))*(f+g*ln(c*(e*x+d)^n)),x,method=_RETURNVERBOSE)

[Out]

x*a*f+x*a*g*ln(c*(e*x+d)^n)-a*g*n*x+a*g/e*n*d*ln(e*x+d)+x*b*ln(c*(e*x+d)^n)*f-b*f*n*x+b*f/e*n*d*ln(e*x+d)+b*g*
x*ln(c*exp(n*ln(e*x+d)))^2+b*d*g/e*ln(c*exp(n*ln(e*x+d)))^2+2*b*g*n^2*x-2*n^2*b*d*g/e*ln(e*x+d)-2*b*g*n*x*ln(c
*exp(n*ln(e*x+d)))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 169, normalized size = 1.54 \begin {gather*} {\left (d e^{\left (-2\right )} \log \left (x e + d\right ) - x e^{\left (-1\right )}\right )} b f n e + {\left (d e^{\left (-2\right )} \log \left (x e + d\right ) - x e^{\left (-1\right )}\right )} a g n e + b g x \log \left ({\left (x e + d\right )}^{n} c\right )^{2} + b f x \log \left ({\left (x e + d\right )}^{n} c\right ) + a g x \log \left ({\left (x e + d\right )}^{n} c\right ) - {\left ({\left (d \log \left (x e + d\right )^{2} - 2 \, x e + 2 \, d \log \left (x e + d\right )\right )} n^{2} e^{\left (-1\right )} - 2 \, {\left (d e^{\left (-2\right )} \log \left (x e + d\right ) - x e^{\left (-1\right )}\right )} n e \log \left ({\left (x e + d\right )}^{n} c\right )\right )} b g + a f x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm="maxima")

[Out]

(d*e^(-2)*log(x*e + d) - x*e^(-1))*b*f*n*e + (d*e^(-2)*log(x*e + d) - x*e^(-1))*a*g*n*e + b*g*x*log((x*e + d)^
n*c)^2 + b*f*x*log((x*e + d)^n*c) + a*g*x*log((x*e + d)^n*c) - ((d*log(x*e + d)^2 - 2*x*e + 2*d*log(x*e + d))*
n^2*e^(-1) - 2*(d*e^(-2)*log(x*e + d) - x*e^(-1))*n*e*log((x*e + d)^n*c))*b*g + a*f*x

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 156, normalized size = 1.42 \begin {gather*} {\left (b g x e \log \left (c\right )^{2} - {\left (2 \, b g n - b f - a g\right )} x e \log \left (c\right ) + {\left (2 \, b g n^{2} + a f - {\left (b f + a g\right )} n\right )} x e + {\left (b g n^{2} x e + b d g n^{2}\right )} \log \left (x e + d\right )^{2} - {\left (2 \, b d g n^{2} + {\left (2 \, b g n^{2} - {\left (b f + a g\right )} n\right )} x e - {\left (b d f + a d g\right )} n - 2 \, {\left (b g n x e + b d g n\right )} \log \left (c\right )\right )} \log \left (x e + d\right )\right )} e^{\left (-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm="fricas")

[Out]

(b*g*x*e*log(c)^2 - (2*b*g*n - b*f - a*g)*x*e*log(c) + (2*b*g*n^2 + a*f - (b*f + a*g)*n)*x*e + (b*g*n^2*x*e +
b*d*g*n^2)*log(x*e + d)^2 - (2*b*d*g*n^2 + (2*b*g*n^2 - (b*f + a*g)*n)*x*e - (b*d*f + a*d*g)*n - 2*(b*g*n*x*e
+ b*d*g*n)*log(c))*log(x*e + d))*e^(-1)

________________________________________________________________________________________

Sympy [A]
time = 0.31, size = 189, normalized size = 1.72 \begin {gather*} \begin {cases} \frac {a d g \log {\left (c \left (d + e x\right )^{n} \right )}}{e} + a f x - a g n x + a g x \log {\left (c \left (d + e x\right )^{n} \right )} + \frac {b d f \log {\left (c \left (d + e x\right )^{n} \right )}}{e} - \frac {2 b d g n \log {\left (c \left (d + e x\right )^{n} \right )}}{e} + \frac {b d g \log {\left (c \left (d + e x\right )^{n} \right )}^{2}}{e} - b f n x + b f x \log {\left (c \left (d + e x\right )^{n} \right )} + 2 b g n^{2} x - 2 b g n x \log {\left (c \left (d + e x\right )^{n} \right )} + b g x \log {\left (c \left (d + e x\right )^{n} \right )}^{2} & \text {for}\: e \neq 0 \\x \left (a + b \log {\left (c d^{n} \right )}\right ) \left (f + g \log {\left (c d^{n} \right )}\right ) & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*(e*x+d)**n))*(f+g*ln(c*(e*x+d)**n)),x)

[Out]

Piecewise((a*d*g*log(c*(d + e*x)**n)/e + a*f*x - a*g*n*x + a*g*x*log(c*(d + e*x)**n) + b*d*f*log(c*(d + e*x)**
n)/e - 2*b*d*g*n*log(c*(d + e*x)**n)/e + b*d*g*log(c*(d + e*x)**n)**2/e - b*f*n*x + b*f*x*log(c*(d + e*x)**n)
+ 2*b*g*n**2*x - 2*b*g*n*x*log(c*(d + e*x)**n) + b*g*x*log(c*(d + e*x)**n)**2, Ne(e, 0)), (x*(a + b*log(c*d**n
))*(f + g*log(c*d**n)), True))

________________________________________________________________________________________

Giac [A]
time = 3.58, size = 214, normalized size = 1.95 \begin {gather*} {\left (x e + d\right )} b g n^{2} e^{\left (-1\right )} \log \left (x e + d\right )^{2} - 2 \, {\left (x e + d\right )} b g n^{2} e^{\left (-1\right )} \log \left (x e + d\right ) + 2 \, {\left (x e + d\right )} b g n e^{\left (-1\right )} \log \left (x e + d\right ) \log \left (c\right ) + 2 \, {\left (x e + d\right )} b g n^{2} e^{\left (-1\right )} + {\left (x e + d\right )} b f n e^{\left (-1\right )} \log \left (x e + d\right ) + {\left (x e + d\right )} a g n e^{\left (-1\right )} \log \left (x e + d\right ) - 2 \, {\left (x e + d\right )} b g n e^{\left (-1\right )} \log \left (c\right ) + {\left (x e + d\right )} b g e^{\left (-1\right )} \log \left (c\right )^{2} - {\left (x e + d\right )} b f n e^{\left (-1\right )} - {\left (x e + d\right )} a g n e^{\left (-1\right )} + {\left (x e + d\right )} b f e^{\left (-1\right )} \log \left (c\right ) + {\left (x e + d\right )} a g e^{\left (-1\right )} \log \left (c\right ) + {\left (x e + d\right )} a f e^{\left (-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm="giac")

[Out]

(x*e + d)*b*g*n^2*e^(-1)*log(x*e + d)^2 - 2*(x*e + d)*b*g*n^2*e^(-1)*log(x*e + d) + 2*(x*e + d)*b*g*n*e^(-1)*l
og(x*e + d)*log(c) + 2*(x*e + d)*b*g*n^2*e^(-1) + (x*e + d)*b*f*n*e^(-1)*log(x*e + d) + (x*e + d)*a*g*n*e^(-1)
*log(x*e + d) - 2*(x*e + d)*b*g*n*e^(-1)*log(c) + (x*e + d)*b*g*e^(-1)*log(c)^2 - (x*e + d)*b*f*n*e^(-1) - (x*
e + d)*a*g*n*e^(-1) + (x*e + d)*b*f*e^(-1)*log(c) + (x*e + d)*a*g*e^(-1)*log(c) + (x*e + d)*a*f*e^(-1)

________________________________________________________________________________________

Mupad [B]
time = 0.27, size = 102, normalized size = 0.93 \begin {gather*} {\ln \left (c\,{\left (d+e\,x\right )}^n\right )}^2\,\left (b\,g\,x+\frac {b\,d\,g}{e}\right )+x\,\left (a\,f-a\,g\,n-b\,f\,n+2\,b\,g\,n^2\right )+x\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )\,\left (a\,g+b\,f-2\,b\,g\,n\right )+\frac {\ln \left (d+e\,x\right )\,\left (a\,d\,g\,n-2\,b\,d\,g\,n^2+b\,d\,f\,n\right )}{e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*(d + e*x)^n))*(f + g*log(c*(d + e*x)^n)),x)

[Out]

log(c*(d + e*x)^n)^2*(b*g*x + (b*d*g)/e) + x*(a*f - a*g*n - b*f*n + 2*b*g*n^2) + x*log(c*(d + e*x)^n)*(a*g + b
*f - 2*b*g*n) + (log(d + e*x)*(a*d*g*n - 2*b*d*g*n^2 + b*d*f*n))/e

________________________________________________________________________________________